package de.tabuma.logging.logik;

import de.tabuma.logging.entity.*;
import java.util.*;
import java.util.logging.*;

/**
 *
 * @author alefen
 */
public class LogEntryFacade {

    public static int create(LogEntry logEntry) {
        return (int) PMF.doCreate(logEntry);
    }

    public static LogEntry get(int id) {
        return PMF.get(id, new LogEntry());
    }

    public static List<LogEntry> get(int objectId, String className) {
        String key[] = new String[2];
        key[0] = "objectId";
        key[1] = "className";
        String value[] = new String[2];
        value[0] = ""+objectId;
        value[1] = className;
        return PMF.get(key, value, new LogEntry());
    }

}
